<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<meta charset="utf-8" />
<title>管理员登录 - 大咖讲后台管理系统</title>
<meta name="description" content="User login page" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!--basic styles-->
<link href="<%=basePath %>bigshot/css/bootstrap.min.css" rel="stylesheet" />
<link href="<%=basePath %>bigshot/css/bootstrap-responsive.min.css" rel="stylesheet" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/font-awesome.min.css" />
<!--[if IE 7]>
<link rel="stylesheet" href="<%=basePath %>bigshot/css/font-awesome-ie7.min.css" />
<![endif]-->
<!--page specific plugin styles-->
<!--fonts-->
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace-fonts.css" />
<!--ace styles-->
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace.min.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace-responsive.min.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace-skins.min.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/lxlin.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace-ie.min.css" />
<![endif]-->
</head>
<body class="login-layout" style="padding-top:8%;">
<div class="main-container ">
	<div class="main-content">
		<div class="row-fluid">
			<div class="span12">
				<div class="login-container">
					<div class="row-fluid">
						<div class="center">
							<h1>
								<img src="<%=basePath %>bigshot/images/logo.png" alt="大咖讲">
							</h1>
						</div>
					</div>

					<div class="space-6"></div>
						<div class="row-fluid">
							<div class="position-relative">
								<div id="login-box" class="login-box visible widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
											<h4 class="header lighter bigger">
												<i class="icon-coffee" style="color:#00b38a;"></i>
												<font color="#00b38a;">找回密码</font>
											</h4>

											<div class="space-6"></div>
												<form action="/admin.php?m=Admin&c=Login&a=login" method="post" onsubmit="return CheckLogin(this)">
													<fieldset>
														<label>
															<span class="block input-icon input-icon-right">
																<input type="text" class="span12" name="username" required="required" placeholder="请输入您的用户名" />
																<i class="icon-user"></i>
															</span>
														</label>

														<label>
															<span class="block input-icon input-icon-right">
																<input type="text" class="span12" name="tellphone" required="required" placeholder="请输入您注册时使用的手机号码" onblur="if(!('/^1[3,5,8]\d{9}$/'.test(this.value))){alert('请输入正确的手机号码！');		}" />
																<i class="icon-phone-sign"></i>
															</span>
														</label>
														<input type="button" class="verification_code  btn btn-small btn-primary" value="获取验证码" onclick="getcode(this.form)" />
														<label>
															<span class="block input-icon input-icon-right">
																<input type="text" class="span12" name="verify" required="required" placeholder="验证码"/>
																<i class="icon-tag"></i>
															</span>
														</label>
														<label>
															<span class="block input-icon input-icon-right">
																<input type="text" class="span12" name="newpassword" required="required" placeholder="请输入新密码"/>
																<i class="icon-tag"></i>
															</span>
														</label>
														<label>
															<span class="block input-icon input-icon-right">
																<input type="text" class="span12" name="newpasswordsecond" required="required" placeholder="请确认新密码"/>
																<i class="icon-tag"></i>
															</span>
														</label>
													
														<span class="block input-icon input-icon-right">
															<button type="submit" class="width-35 pull-right btn btn-small btn-primary" onclick="return CheckLogin(this.form)">
																<i class="icon-key"></i>
																	提交
															</button>
														</span>
														<a href="<%=basePath %>redirect/login.do">返回登陆</a>
													</fieldset>
												</form>
											</div><!--/widget-main-->
										</div><!--/widget-body-->
									</div><!--/login-box-->
								</div><!--/position-relative-->
							</div>
					</div>
			</div><!--/.span-->
		</div><!--/.row-fluid-->
	</div>
</div><!--/.main-container-->

<!--basic scripts-->

<!--[if !IE]>-->
<script type="text/javascript">
	window.jQuery || document.write("<script src='<%=basePath %>bigshot/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
</script>
<!--<![endif]-->
<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='<%=basePath %>bigshot/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
</script>
<![endif]-->
<script type="text/javascript">
	function CheckLogin(form){
		if(form.username.value==""){
			alert("请输入您的用户名！");
			form.username.focus();
			return false;
		}
		else if(form.tellphone.value==""){
			alert("手机号码不能为空！");
			form.tellphone.focus();
			return false;		
		}
		else if(form.verify.value==""){
			alert("验证码不能为空！");
			form.verify.focus();
			return false;		
		}
		else if(form.newpassword.value==""){
			alert("请输入您的新密码！");
			form.newpassword.focus();
			return false;		
		}
		else if(form.newpasswordsecond.value==""){
			alert("请确认您的新密码！");
			form.newpasswordsecond.focus();
			return false;		
		}
		else if(form.newpassword.value!=form.newpasswordsecond.value){
			alert("两次输入的密码不一致，请确认您的新密码！");
			form.newpassword.focus();
			return false;		
		}
		else{
			form.submit();
		}
	}
	function getcode(form){
		if(form.username.value==""){
			alert("请输入您的用户名！");
			form.username.focus();
		}
		else if(form.tellphone.value==""){
			alert("手机号码不能为空！");
			form.tellphone.focus();	
		}
	}
	function tellphone(form){
		console.log(1 );
		if(isNan(form.username.value)){
			alert("请输入正确的手机号码！");
		}
	}
</script>
</body>
</html>